import { get, post } from "@/packages/http/request.ts";

// 查询图片
export const searchPicture = (params: any) => {
  return post("/picture/searchPicture", params, {}, true);
};

// 修改照片信息
export const updatePicture = (params: any) => {
  return post("/picture/updatePicture", params);
};

// 移入精选
export const moveInExcellent = (params: any) => {
  return post("/picture/moveInExcellent", params);
};

// 移除目录
export const moveOut = (params: any) => {
  return post("/picture/moveOut", params);
};

// 添加为主图
export const moveInMainPic = (params: any) => {
  return post("/picture/moveInMainPic", params);
};

// 移出精选
export const moveOutExcellent = (params: any) => {
  return post("/picture/moveOutExcellent", params);
};

// 移出主图
export const moveOutMainPic = (params: any) => {
  return post("/picture/moveOutMainPic", params);
};

export const pictureUpload = (params: any) => {
  return post("/picture/pictureUpload", params, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
};

export const uploadDataToMysql = (params: any) => {
  return post("/picture/uploadDataToMysql", params);
};

// 设置为开屏图片
export const moveInOpenScreenPic = (params: any) => {
  return post("/banner/addBanner", params);
};

// 移除
export const moveOutOpenScreenPic = (params: any) => {
  return post("/banner/delBanner", params);
};
